-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix] Set output.experimentalMinChunkSize to 0, to counter a change in [email protected] #1449
[bugfix] Set output.experimentalMinChunkSize to 0, to counter a change in [email protected] #1449
Conversation
experimentalMinChunkSize: 0, | ||
format: 'es', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I alphabetized the keys. When there is a list of configuration keys, people tend to add a new one to the end of the list. I find unsorted lists not easy to understand and maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice write up!
For testing, can you bump the rollup version in tests/scenarios to 3.22+? |
Yep, I can try. |
@@ -42,7 +42,7 @@ | |||
"@types/fs-extra": "^9.0.12", | |||
"@types/minimatch": "^3.0.4", | |||
"@types/yargs": "^17.0.3", | |||
"rollup": "^2.58.0", | |||
"rollup": "^3.23.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://github.com/rollup/rollup/releases/tag/v3.0.0 for breaking changes that might affect @embroider
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NullVoxPopuli Can you run CI for me?
…pluging-ts continues to build *.d.ts files correctly, when rollup@>=3.22.0 is installed
Yesterday, 2 out of 200 checks (both on windows env, if I recall) failed due to a test timeout. I rebased the branch to rerun the CI and 1 check failed because of a timeout. Can you manually retry the failing check? |
Thank you! |
Background
A few independent incidences
After updating
rollup
to3.22.0
, the packageembroider-css-modules
worked, in the sense that the consuming app (a test app) continued to run and all tests for the test app continued to pass. I noticed, however, that thelint:types
script of the test app failed becauseembroider-css-modules
didn't createdist/index.d.ts
in the same way as before.Error messages
What
dist
looked like before updatingrollup
What
dist
looked like after updatingrollup
After updating
rollup
to3.22.0
in another package (in another repo), I noticed that a different file calleddist/template-registry.d.ts
had been created differently. The test app for that package also failedlint:types
as a result.What
dist/template-registry.d.ts
looked like before updatingrollup
What
dist/template-registry.d.ts
looked like after updatingrollup
Finally, on Discord,
@jeffsawatzky
described encountering a similar issue.Possible root cause
I reported the issue to the maintainers of
rollup
in rollup/rollup#5008.@lukastaegert noticed, the problem seemed to be limited to
*.d.ts
files, e.g.dist/index.d.ts
,dist/template-registry.d.ts
. If so,rollup-plugin-ts
(which we use to support TypeScript) or one of its dependencies, might have made an assumption about chunks that is not valid as of[email protected]
.Proposed solution
Lukas (who maintains
rollup
) and I both think, a good option is for@embroider/addon-dev
to explicitly setoutput.experimentalMinChunkSize
to0
.This way, an addon maintainer doesn't need to set the value themselves in
rollup.config.js
:At the same time, the maintainers of
rollup
could continue to iterate on the default value ofexperimentalMinChunkSize
forv3
andv4
.Related links